<%@ page import="java.util.Calendar" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>获取实验室信息</title>
  <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
  <script type="text/javascript">
    <%
        request.setCharacterEncoding("utf-8");
        String ip = request.getHeader("x-forwarded-for");
        if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip)) {
          ip = request.getHeader("Proxy-Client-IP");
        }
        if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip) ) {
          ip = request.getHeader("WL-Proxy-Client-IP");
        }
        if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip) ) {
          ip = request.getHeader("HTTP_CLIENT_IP");
        }
        if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip) ) {
          ip = request.getHeader("HTTP_X_FORWARDED_FOR");
        }
        if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip) ) {
          ip = request.getRemoteAddr();
        }
    %>

    function doCode () {
        $('#npcImg').removeAttr('src')
        var npcName = document.getElementById("swineEar").value;
        if(npcName === ''){

        }else{
            var img = document.getElementById("npcImg");
            img.src = '/getQRCode?content='+npcName;
        }
    }
  </script>
</head>
<body>

<form action="/getQRCode">
   <input type="text" name="content">
</form>
<h1>测试二维码</h1>
<div>
    <div style="float: left;">
        <img src="/getQRCode" id="npcImg" width="300" height="300"/>
        <input type="hidden" id="photo" name="photo"/>
    </div>
</div>
<%=ip%>
<a href="/getIP/IP">IP</a>
<a href="/managerInfo/infos/<%=ip%>">管理员信息</a>
<a href="/classInfo/infos/<%=ip%>">教室信息</a>
<a href="/allnumber/all/<%=ip%>">总人数</a>
<a href="/realNumber/is_att/<%=ip%>">实到人数</a>
</body>
</html>
